using System.Collections.Generic;

namespace HslCommunicationEx.VarMonitor
{
	public class CellFilterCompare : IEqualityComparer<CellFilterInfo>
	{
		public bool Equals(CellFilterInfo x, CellFilterInfo y)
		{
			if (x == null)
			{
				return y == null;
			}
			return x.Condition == y.Condition;
		}

		public int GetHashCode(CellFilterInfo obj)
		{
			return obj?.Condition.GetHashCode() ?? 0;
		}
	}
}
